<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>汽车4S店客服管理系统主页</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="汽车,4S店,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<link rel="stylesheet" type="text/css" href="CSS/reMainPage.css"> 
	<link rel="stylesheet" type="text/css" href="CSS/mainPage.css"> 
	<script type="text/javascript"  src="JS/jquery-3.1.0.js"></script>
	<script type="text/javascript"  src="JS/reMainPage.js"></script>
	<script type="text/javascript"  src="JS/mainPage.js"></script>
  </head>
  
  <body>
    <% 
    	request.setCharacterEncoding("utf-8");
    	response.setHeader("Content-type", "text/html;charset=UTF-8");
    	response.setCharacterEncoding("UTF-8"); 
    %>
    <%
    	String name=(String)session.getAttribute("name"); 
    	String ident=(String)session.getAttribute("ident");
     %>
    <div class="allbody">
    	<div class="headbody">
    		<div class="maintitle">汽车4S店客服管理系统</div>
    	</div>
    	<div class="mylist" id="mylist">
    		<ul class="prolist">
    			<li><a href="userList">车型信息</a></li>
    			<li><a href="user">个人信息</a></li>
    			<li>
    				<c:if test="${ident!='职工'&&ident!='管理员'}">
    					车型保养维修
    				</c:if>
    			</li>
    			<li>
    				<c:if test="${ident=='用户'}">
    					客服
    				</c:if>
    			</li>
    			<li>
    				<c:if test="${ident!='职工'&&ident!='管理员'}">
    					个人订单
    				</c:if>
    			</li>
    			<c:if test="${ident=='职工'||ident=='管理员'}">
    				<li><a href="pendTask">待处理任务</a></li>
    				<li>增加车型</li>
    				<li>车型试驾订购</li>
    				<li>车型维修保养</li>
    				<li>订单处理</li>
    				<li>总订单</li>
    			</c:if>
    			<c:if test="${ident=='管理员'}">
    				<li>职工信息</li>
    				<li>用户信息</li>
    			</c:if>
    		</ul>
    	</div>
    	<div class="carmain">
    		<div class="myselect">
    		<table class="table1">
    			<tr>
    				<td class="carcall">品牌</td>
    				<td>
    					<select  class="car_trade" name="car_trade">
    						<option value="全部" <c:if test="${sessionScope.CAR_BRAND==null}">selected</c:if>  >全部</option>
    						<c:forEach items="${sessionScope.list_trade}" var="list_trade">
    							<option value="${list_trade}" <c:if test="${sessionScope.CAR_BRAND==list_trade}">selected</c:if> >${list_trade}</option>
    						</c:forEach>
    					</select>
    				</td>
    				<td class="carcall">车型价格区间</td>
    				<td>
    					<select  class="car_money" name="car_money">
    						<option value="全部" <c:if test="${sessionScope.CAR_MONEY==null}">selected</c:if> >全部</option>
    						<c:forEach begin="0" end="99" var="i" step="10">
    							<option value="${i}"   <c:if test="${sessionScope.CAR_MONEY==i}">selected</c:if>>${i}-${i+10}万</option>
    						</c:forEach>
    						<option value="100"  <c:if test="${sessionScope.CAR_MONEY==100}">selected</c:if>>100万以上</option>
    					</select>
    				</td>
    				<td class="carcall">车型名称</td>
    				<td>
    					<select class="car_name" name="car_name">
    						<option value="全部" <c:if test="${sessionScope.CAR_NAME==null}">selected</c:if>  >全部</option>
    						<c:forEach items="${sessionScope.list_name}" var="list_name">
    							<option value="${list_name}" <c:if test="${sessionScope.CAR_NAME==list_name}">selected</c:if> >${list_name}</option>
    						</c:forEach>
    					</select>
    				</td>
    				<td class="carcall">车型级别</td>
    				<td>
    					<select  class="car_type"  name="car_type">
    						<option value="全部"   <c:if test="${sessionScope.CAR_TYPE==null}">selected</c:if> >全部</option>
							<option value="微型车"  <c:if test="${sessionScope.CAR_TYPE=='微型车'}">selected</c:if> >微型车</option>
							<option value="小型车"  <c:if test="${sessionScope.CAR_TYPE=='小型车'}">selected</c:if> >小型车</option>
							<option value="紧凑型车" <c:if test="${sessionScope.CAR_TYPE=='紧凑型车'}">selected</c:if> >紧凑型车</option>
							<option value="中型车"  <c:if test="${sessionScope.CAR_TYPE=='中型车'}">selected</c:if> >中型车</option>
							<option value="中大型车" <c:if test="${sessionScope.CAR_TYPE=='中大型车'}">selected</c:if> >中大型车</option>
							<option value="大型车"  <c:if test="${sessionScope.CAR_TYPE=='大型车'}">selected</c:if> >大型车</option>
							<option value="小型SUV"   <c:if test="${sessionScope.CAR_TYPE=='小型SUV'}">selected</c:if> >小型SUV</option>
							<option value="中型SUV"   <c:if test="${sessionScope.CAR_TYPE=='中型SUV'}">selected</c:if> >中型SUV</option>
							<option value="大型SUV"   <c:if test="${sessionScope.CAR_TYPE=='大型SUV'}">selected</c:if> >大型SUV</option>
							<option value="MPV"   <c:if test="${sessionScope.CAR_TYPE=='MPV'}">selected</c:if> >MPV</option>
							<option value="跑车"   <c:if test="${sessionScope.CAR_TYPE=='跑车'}">selected</c:if> >跑车</option>
							<option value="皮卡"   <c:if test="${sessionScope.CAR_TYPE=='皮卡'}">selected</c:if> >皮卡</option>
							<option value="微面"   <c:if test="${sessionScope.CAR_TYPE=='微面'}">selected</c:if> >微面</option>
							<option value="轻客"   <c:if test="${sessionScope.CAR_TYPE=='轻客'}">selected</c:if> >轻客</option>
    					</select>
    				</td>
    				<td class="carcall">销售状态</td>
    				<td>
    					<select class="car_state" name="car_state">
    						<option value="全部" <c:if test="${sessionScope.CAR_STATE==null}">selected</c:if> >全部</option>
    						<option value="在售" <c:if test="${sessionScope.CAR_STATE=='在售'}">selected</c:if> >在售</option>
    						<option value="厂家预售" <c:if test="${sessionScope.CAR_STATE=='厂家预售'}">selected</c:if> >厂家预售</option>
    						<option value="终止销售" <c:if test="${sessionScope.CAR_STATE=='终止销售'}">selected</c:if> >终止销售</option>
    					</select>
    				</td>
    			</tr>
    			<tr>
    				<td colspan="10">
    				<span class="ordermail">按销量排序<input type="radio" name="order_car" value="order_sell" <c:if test="${sessionScope.order_car=='CAR_SELL'}">checked</c:if> ></span>
    				<span class="ordermoney">按价格排序<input type="radio" name="order_car" value="order_money" <c:if test="${sessionScope.order_car=='CAR_MONEY'}">checked</c:if>></span>
    				<input type="button" value="查询" class="findcar">
    				<input type="text"   class="carAboutMess"  value="${sessionScope.carAboutMess}">
    				</td>
    			</tr>
    		</table>
    		</div>
    		<c:if test="${sessionScope.name!=null}">
    			<div class="username">
    				欢迎登陆,<%=name%><%=ident%>
    			</div>
    			<div class="closelogin">
    				<a href="javascript:void(0);">退出登陆</a>
    			</div>
    		</c:if>
    		<c:if test="${sessionScope.name==null}">
    			<div class="username">
    				<a href="index.jsp">请登录</a>
    			</div>
    		</c:if>
    		<div class="showCarMess">
    				<c:if test="${sessionScope.result=='加载车型数据成功'}">
	    				<c:forEach items="${sessionScope.carmess}" var="carmess">
	    					<div class="each_car">
	    						<img alt="图片加载失败"  src="car_image/${carmess.CAR_IMAGE}">
	    						<span class="carname">车型名称：${carmess.CAR_NAME}</span>
	    						<span class="cartype">车型级别：${carmess.CAR_TYPE}</span>
	    						<span class="carmoney">车型价格：${carmess.CAR_MONEY}万元</span>
	    						<span class="cartrade">车型品牌：${carmess.CAR_BRAND}</span>
	    						<span class="carstate">车型状态：${carmess.CAR_STATE}</span>
	    						<span class="carsell">车型销量：${carmess.CAR_SELL}辆</span>
	    						<img alt="图片加载失败"  src="car_image/${carmess.CAR_CRON}">
	    						<input type="button" value="更多配置信息">
	    						<c:if test="${ident!='职工'&&ident!='管理员'}">
    								<input type="button" value="车型试驾">
	    							<input type="button" value="车型购买">
    							</c:if>
	    					</div>
	    				</c:forEach>
	    				<div class="page_forward">
	    					<input type="button" value="首页"  class="page_one">
	    					<input type="button" value="上一页" class="page_before">
	    					<input type="button" value="下一页" class="page_down">
	    					<input type="button" value="尾页"  class="page_end">
	    				</div>
    				</c:if>
    				<c:if test="${sessionScope.result=='无该车型信息'}">
    					<div class="noMess">
    						<span>抱歉，并没有您查询的车型信息T^T</span>
    					</div>
    				</c:if>
    		</div>
    	</div>
    </div>
  </body>
</html>
